/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/3/14.
	 */
	var RealName = __webpack_require__(1);
	var FinanceDetail = __webpack_require__(37);

	var Root = React.createClass({displayName: "Root",
	    getInitialState:function(){
	        return{
	            ProDetail:PageDM.ProDetail.value,
	            realNameInfo:PageDM.realNameInfo.value
	        }
	    },
	    componentDidMount: function(){
	        var _this = this;
	        var PageDM = window.PageDM;

	        //项目详情
	        UEventHub.on(PageDM.ProDetail.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.setState({
	                ProDetail:v
	            })
	        });
	        //个人实名信息
	        UEventHub.on(PageDM.realNameInfo.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.setState({
	                realNameInfo:v
	            })
	        });
	        //URL
	        UEventHub.on(PageDM.URL.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            var checkRef = _this.refs.detail.getRefs('agreement');
	            if(checkRef){
	                checkRef.setState({
	                    url:v
	                })
	            }
	        });
	        UEventHub.emit("pageLoad","hello world!");
	    },
	    render: function () {

	        return (
	            React.createElement("div", null, 

	                React.createElement("div", {className: "mod-account container"}, 
	                    React.createElement("div", {className: "sub-nav"}, 
	                        React.createElement(RealName, {data: this.state.realNameInfo})
	                    ), 
	                    React.createElement("div", {className: "account"}, 
	                        React.createElement(FinanceDetail, {ref: "detail", url: PageDM.URL, ProDetail: this.state.ProDetail, exportPDF: PageDM.exportPDF, printBtn: PageDM.printBtn})
	                    ), 
	                    React.createElement("div", {className: "clear"})
	                )

	            )
	        )
	    }
	});
	ReactDOM.render(React.createElement(Root, null), document.getElementById('giraffe'));

/***/ },

/***/ 1:
/***/ function(module, exports, __webpack_require__) {

	/*
	 * Created by Administrator on 2017/3/31.
	 */

	var Tooltip = __webpack_require__(2);
	var RealName = React.createClass({displayName: "RealName",
	    getDefaultProps: function() {
	        return{
	            data:{
	                IsNew:0, //是否有新消息
	                AccType:0,
	                Mobile:"",  //手机
	                IsBindMobile:"",//是否绑定手机
	                BindMobileUrl:"",//绑定手机链接
	                IsBindIDCard:"",//是否验证身份
	                BindIDCardUrl:"",//验证身份链接
	                IsBindBankCard:"",//是否绑卡
	                BindBankCardUrl:"",//绑卡链接
	                Current:"InvestAccount",  //当前选中菜单
	                InvestAccountUrl:"",//账户总览链接
	                InvestListUrl:"",//投资记录链接
	                MyBankCardUrl:"",//我的银行卡链接
	                InvestInfoUrl:"",//投资个人信息
	                InvestMessageUrl:"",//投资消息中心
	                FinanceAccountUrl:"",//账户总览链接
	                FinanceListUrl:"",//融资记录链接
	                FinanceAccountInfoUrl:"",//融资账号信息
	                FinanceMessageUrl:""//融资消息中心
	            }
	        }
	    },
	    getInitialState:function () {
	        return {
	            data:this.props.data
	        }
	    },
	    componentDidMount:function(){
	    },
	    render: function () {
	        return (
	            React.createElement("div", null, 
	                React.createElement("div", {className: "info", ref: "realName"}, 
	                        React.createElement("div", {className: "face"}, React.createElement("img", {src: "../content/images/account/face.jpg", alt: ""}), this.state.data.Mobile), 
	                    this.state.data.AccType ? "" :
	                        React.createElement("div", {className: "bind"}, 
	                            React.createElement(Tooltip, {title: this.state.data.IsBindMobile ? "已绑定手机" : "未绑定手机"}, React.createElement("a", {href: this.state.data.BindMobileUrl ? this.state.data.BindMobileUrl : 'javascript:;'}, React.createElement("i", {className: "iconfont icon-phone1 tooltip "+ (this.state.data.IsBindMobile ? "ok" : "")}))), 
	                            React.createElement(Tooltip, {title: this.state.data.IsBindIDCard ? "已绑定身份证" : "未绑定身份证"}, React.createElement("a", {href: this.state.data.BindIDCardUrl ? this.state.data.BindIDCardUrl : 'javascript:;'}, React.createElement("i", {className: "iconfont icon-idcard2 tooltip "+ (this.state.data.IsBindIDCard ? "ok" : "")}))), 
	                            React.createElement(Tooltip, {title: this.state.data.IsBindBankCard ? "已绑定银行卡" : "未绑定银行卡"}, React.createElement("a", {href: this.state.data.BindBankCardUrl ? this.state.data.BindBankCardUrl : 'javascript:;'}, React.createElement("i", {className: "iconfont icon-bankcard tooltip "+ (this.state.data.IsBindBankCard ? "ok" : "")})))
	                        )
	                    
	                ), 
	                React.createElement("div", {className: "nav"}, 
	                    this.state.data.AccType ? React.createElement("ul", null, 
	                            React.createElement("li", null, React.createElement("a", {href: this.state.data.FinanceAccountUrl, className: this.state.data.Current == "FinanceAccount" ? "current": ""}, React.createElement("i", {className: "icon-loan iconfont"}), "账户总览")), 
	                            React.createElement("li", null, React.createElement("a", {href: this.state.data.FinanceListUrl, className: this.state.data.Current == "FinanceList" ? "current": ""}, React.createElement("i", {className: "icon-card iconfont"}), "融资记录")), 
	                            React.createElement("li", null, React.createElement("a", {href: this.state.data.FinanceAccountInfoUrl, className: this.state.data.Current == "FinanceAccountInfo" ? "current": ""}, React.createElement("i", {className: "icon-personal iconfont"}), "账号信息")), 
	                            React.createElement("li", null, React.createElement("a", {href: this.state.data.FinanceMessageUrl, className: this.state.data.Current == "FinanceMessage" ? "current": ""}, React.createElement("i", {className: "icon-news iconfont"}), "消息中心", this.state.data.IsNew ? React.createElement("b", null) : '')), " ")
	                          : React.createElement("ul", null, React.createElement("li", null, React.createElement("a", {href: this.state.data.InvestAccountUrl, className: this.state.data.Current == "InvestAccount" ? "current": ""}, " ", React.createElement("i", {className: "icon-loan iconfont"}), "账户总览")), 
	                        React.createElement("li", null, React.createElement("a", {href: this.state.data.InvestListUrl, className: this.state.data.Current == "InvestList" ? "current": ""}, " ", React.createElement("i", {className: "icon-record iconfont"}), "投资记录")), 
	                        React.createElement("li", null, React.createElement("a", {href: this.state.data.FinanceListUrl, className: this.state.data.Current == "FinanceList" ? "current": ""}, React.createElement("i", {className: "icon-card iconfont"}), "融资记录")), 
	                        React.createElement("li", null, React.createElement("a", {href: this.state.data.MyBankCardUrl, className: this.state.data.Current == "MyBankCard" ? "current": ""}, " ", React.createElement("i", {className: "icon-card iconfont"}), "我的银行卡")), 
	                        React.createElement("li", null, React.createElement("a", {href: this.state.data.InvestInfoUrl, className: this.state.data.Current == "InvestInfo" ? "current": ""}, " ", React.createElement("i", {className: "icon-personal iconfont"}), "个人信息")), 
	                        React.createElement("li", null, React.createElement("a", {href: this.state.data.InvestMessageUrl, className: this.state.data.Current == "InvestMessage" ? "current": ""}, " ", React.createElement("i", {className: "icon-news iconfont"}), "消息中心", this.state.data.IsNew ? React.createElement("b", null) : ''))
	                    )
	                ), 
	                React.createElement("div", {className: "qrcode"}, 
	                    React.createElement("p", {className: "ss"}, "扫一扫，立马赚钱", React.createElement("b", {className: "bg-icon"})), 
	                    React.createElement("img", {src: "../content/images/qrcode.jpg", alt: ""})
	                )
	            )
	        )
	    }
	})

	module.exports = RealName;

/***/ },

/***/ 2:
/***/ function(module, exports) {

	/**
	 *
	 * @constructs
	 */
	var Tooltip = React.createClass({displayName: "Tooltip",
	    _addEventListener:function(obj,ev,fn){
			obj.addEventListener ? obj.addEventListener(ev,fn,false) : obj.attachEvent("on" + ev,fn)
	    },
	    _removeEventListener: function (obj, ev, fn) {
	        obj.removeEventListener ? obj.removeEventListener(ev, fn, false) : obj.detachEvent("on" + ev, fn)
	    },
		getDefaultProps: function() {
			return {
				container: document.body,
				position: 'top',
				fixed: true,
				space: 5
			}
		},
		componentDidMount: function() {
			this.container = this.props.container || document.body;
			this.componentEl = this.refs.tooltipbox;
			this.tooltipEl = document.createElement('div');

			var tooltipArrowEl = document.createElement('div');
			tooltipArrowEl.className = 'ucs-tooltip-arrow';

			var tooltipContentEl = document.createElement('div');
			tooltipContentEl.className = 'ucs-tooltip-inner';
			tooltipContentEl.innerHTML = this.props.title;

			this.tooltipEl.appendChild(tooltipArrowEl);
			this.tooltipEl.appendChild(tooltipContentEl);
			this.tooltipEl.className = 'ucs-tooltip ' + this.props.position;
			this.container.appendChild(this.tooltipEl);
			this.resetTooltip();
			var _componentEl =  this.componentEl;
			this._addEventListener(_componentEl, this.props.fixed ? 'mouseenter' : 'mousemove', this.handleMouseMove.bind(this));
			this._addEventListener(_componentEl, 'mouseleave', this.handleMouseOut.bind(this));
		},

		resetTooltip: function() {
			this.tooltipEl.style.left = '-500px';
			this.tooltipEl.style.top = '-500px';
			this.tooltipEl.style.visibility = "hidden";
		},

		handleMouseMove: function(e) {
			if(!this.props.title) {
				return;
			}

			var tooltipPosition = this.getTooltipPosition(e);
			var tooltipOffset = this.getTooltipOffset();

			this.tooltipEl.style.left = tooltipPosition.x + tooltipOffset.x + 'px';
			this.tooltipEl.style.top = tooltipPosition.y + tooltipOffset.y + 'px';
			this.tooltipEl.style.visibility = "visible";
		},

		handleMouseOut: function() {
			this.resetTooltip();
		},
		//定位到标签的位置
		getTooltipPosition: function(e) {
			var pointX;
			var pointY;
			var bodyRect = document.body.getBoundingClientRect();
			var containerRect = this.container.getBoundingClientRect();
			var containerOffsetX = containerRect.left - bodyRect.left;
			var containerOffsetY = containerRect.top - bodyRect.top;
			if(this.props.fixed) {
				var componentRect = this.componentEl.getBoundingClientRect();
				var componentOffsetX = componentRect.left - containerOffsetX;
				var componentOffsetY = componentRect.top - containerOffsetY;
				var componentWidth = this.componentEl.offsetWidth;
				var componentHeight = this.componentEl.offsetHeight;
				var cOffsetX = 0;
				var cOffsetY = 0;
				switch(this.props.position) {
					case 'top':
						cOffsetX = componentWidth / 2;
						cOffsetY = 0;
						break;
					case 'right':
						cOffsetX = componentWidth;
						cOffsetY = componentHeight / 2;
						break;
					case 'bottom':
						cOffsetX = componentWidth / 2;
						cOffsetY = componentHeight;
						break;
					case 'left':
						cOffsetX = 0;
						cOffsetY = componentHeight / 2;
						break;
				}
				pointX = componentOffsetX + cOffsetX + (window.scrollX || window.pageXOffset || document.documentElement.scrollLeft || 0);
				pointY = componentOffsetY + cOffsetY + (window.scrollY || window.pageYOffset || document.documentElement.scrollTop || 0);
			} else {
				var clientX = e.clientX;
				var clientY = e.clientY;
				pointX = clientX - containerOffsetX + (window.scrollX || window.pageXOffset || document.documentElement.scrollLeft || 0);
				pointY = clientY - containerOffsetY + (window.scrollY || window.pageYOffset || document.documentElement.scrollTop || 0);
			}
			return {
				x: pointX,
				y: pointY
			};
		},
		//获取偏移量
		getTooltipOffset: function() {
			var tooltipW = this.tooltipEl.offsetWidth;
			var tooltipH = this.tooltipEl.offsetHeight;
			var offsetX = 0;
			var offsetY = 0;
			switch(this.props.position) {
				case 'top':
					offsetX = -(tooltipW / 2);
					offsetY = -(tooltipH + Number(this.props.space));
					break;
				case 'right':
					offsetX = Number(this.props.space);
					offsetY = -(tooltipH / 2);
					break;
				case 'bottom':
					offsetX = -(tooltipW / 2);
					offsetY = Number(this.props.space);
					break;
				case 'left':
					offsetX = -(tooltipW + Number(this.props.space));
					offsetY = -(tooltipH / 2);
					break;
			}
			return {
				x: offsetX,
				y: offsetY
			};
		},
		render: function() {
			return (
			    React.createElement("div", {ref: "tooltipbox", className: this.props.className?("ucs-tooltip-wrap "+this.props.className):"ucs-tooltip-wrap"}, this.props.children)
	        )
		}
	});

	module.exports = Tooltip;

/***/ },

/***/ 37:
/***/ function(module, exports) {

	/**
	 * Created by DuHuiling on 2017/4/25.
	 */
	var Agreement = React.createClass({displayName: "Agreement",
	    getDefaultProps:function () {
	        return{
	            url:PageDM.URL.value
	        }
	    },
	    getInitialState:function () {
	        return{
	            url:this.props.url
	        }
	    },
	    render:function () {
	        return React.createElement("a", {href: this.state.url.agreement.link, className: "agreement", target: "_blank"}, React.createElement("i", {className: "iconfont icon-protocol11"}), "《", this.state.url.agreement.name, "》")
	    }
	});

	var InvestDetail = React.createClass({displayName: "InvestDetail",
	    getInitialState:function(){
	        return{
	            ProDetail:this.props.ProDetail
	        }
	    },
	    //导出PDF文件
	    exportPDF:function(){
	        //console.log(this.refs.getRealDom);
	        this.props.exportPDF.onClick(this.refs.getRealDom.outerHTML);
	    },
	    getRefs:function (ref) {
	        return this.refs[ref];
	    },
	    render:function(){
	        var _this = this, _state = _this.state,
	            ProDetail = _state.ProDetail.ProjectDetail,
	            FinancingDetail = _state.ProDetail.FinancingDetail;
	        //剩余时间
	        var RepayBegin = UFormatter.formatTime(ProDetail.RepayBegin,"yyyy/mm/dd");
	        var remain = Math.ceil((new Date(RepayBegin) - new Date()) / 1000 / 60 / 60 / 24);
	        if(remain < 0)
	            remain = 0;
	        //数字格式化
	        var TotalRepayment = Number(FinancingDetail.TotalRepayment),_moreOverTotal = false,
	            IAmount = Number(ProDetail.IAmount),_moreOverIAmount = false,
	            FinancingCost = Number(FinancingDetail.FinancingCost), _moreOverFC = false;
	        // if(TotalRepayment < 10000){
	            TotalRepayment = UFormatter.formatMoney(TotalRepayment,2);
	        // }else{
	        //     TotalRepayment = UFormatter.formatMoney(TotalRepayment / 10000,2);
	        //     _moreOverTotal = true;
	        // }
	        // if(IAmount < 10000){
	            IAmount = UFormatter.formatMoney(IAmount,2);
	        // }else{
	        //     IAmount = UFormatter.formatMoney(IAmount / 10000,2);
	        //     _moreOverIAmount = true;
	        // }
	        // if(FinancingCost < 10000){
	            FinancingCost = UFormatter.formatMoney(FinancingCost,2);
	        // }else{
	        //     FinancingCost = UFormatter.formatMoney(FinancingCost / 10000,2);
	        //     _moreOverFC = true;
	        // }
	        return(
	            React.createElement("div", {className: "invest-detail"}, 
	                React.createElement("div", {className: "title-account"}, React.createElement("span", null, "融资详情"), 
	                    React.createElement("div", {className: "other"}, 
	                        React.createElement("a", {href: "javascript:void (0)", onClick: this.exportPDF.bind(this)}, React.createElement("i", {className: "iconfont icon-export"}), React.createElement("p", null, "导出PDF文件")), 
	                        React.createElement("a", {href: "javascript:void (0)", onClick: this.props.printBtn.onClick}, React.createElement("i", {className: "iconfont icon-print"}), React.createElement("p", null, "打印")), 
	                        React.createElement("a", {href: PageDM.URL.value.goBack}, React.createElement("i", {className: "iconfont icon-back"}), React.createElement("p", null, "返回"))
	                    )
	                ), 
	                React.createElement("div", {ref: "getRealDom"}, 
	                    React.createElement("h1", null, 
	                        ProDetail.ProjectName, 
	                        React.createElement("span", {className: "tag "+((ProDetail.F_Status == 1 || ProDetail.F_Status == 2 || ProDetail.F_Status == 3) ? "tag-red" : (ProDetail.F_Status == 6 ? "tag-grey" : "tag-yellow" ))}, 
	                            
	                                ProDetail.F_Status == 1 ? "还款中" :
	                                ProDetail.F_Status == 2 ? "还款完成" :
	                                ProDetail.F_Status == 3 ? "融资完成" :
	                                ProDetail.F_Status == 4 ? "投标中" :
	                                ProDetail.F_Status == 5 ? "预热中" :
	                                ProDetail.F_Status == 6 ? "项目流标" : ""
	                            
	                        ), 
	                        ProDetail.F_Status == 1 ?
	                            React.createElement("span", {className: "countdown-data"}, React.createElement("i", {className: "iconfont icon-clock"}), "距离还款日还有：", React.createElement("b", {className: "fc-main"}, remain, "天")) : ""
	                        
	                    ), 
	                    React.createElement("div", {className: "money"}, 
	                        React.createElement("ul", {className: "clearfix"}, 
	                            React.createElement("li", {className: "col-1"}, 
	                                React.createElement("p", {className: "fc-main"}, React.createElement("b", {className: "fs42"}, TotalRepayment), _moreOverTotal?"万元":"元"), 
	                                React.createElement("p", {className: "fc-light"}, "到期应还资金总额")
	                            ), 
	                            React.createElement("li", {className: "col-2"}, 
	                                React.createElement("p", null, "还款日期", React.createElement("b", null, ProDetail.RepayBegin)), 
	                                React.createElement("p", null, "借款人", React.createElement("b", null, this.state.ProDetail.CallbackAccount.AccountName))
	                            )
	                        )
	                    ), 
	                    React.createElement("div", {className: "info"}, 
	                        React.createElement("ul", {className: "clearfix"}, 
	                            React.createElement("li", null, React.createElement("p", null, React.createElement("b", null, IAmount), _moreOverIAmount?"万元":"元"), 
	                                React.createElement("p", {className: "fc-light"}, "融资金额")), 
	                            React.createElement("li", null, React.createElement("p", {className: "fc-main"}, React.createElement("b", null, FinancingCost), _moreOverFC?"万元":"元"), 
	                                React.createElement("p", {className: "fc-light"}, "融资成本")), 
	                            React.createElement("li", null, React.createElement("p", {className: "fc-main"}, React.createElement("b", null, ProDetail.FinanceRate), "%"), 
	                                React.createElement("p", {className: "fc-light"}, "融资利率"))
	                        )
	                    ), 
	                    React.createElement("div", {className: "pro-data"}, 
	                        React.createElement("ul", {className: "clearfix"}, 
	                            React.createElement("li", null, "融资期限：", ProDetail.Duration+"天"), 
	                            React.createElement("li", null, "起息日：", ProDetail.ValueBegin), 
	                            React.createElement("li", null, "到期日：", ProDetail.RepayBegin)
	                        )
	                    ), 
	                    React.createElement("div", {className: "bank-back clearfix"}, 
	                        React.createElement("label", {className: "f-left"}, "回款账户："), 
	                        React.createElement("div", {className: "input f-left"}, 
	                            React.createElement("span", {className: "bank-logo "+this.state.ProDetail.CallbackAccount.BankLogo}), 
	                            React.createElement("span", null, this.state.ProDetail.CallbackAccount.AccountNo)
	                        ), 
	                        (ProDetail.F_Status == 1 || ProDetail.F_Status == 2) ?
	                            React.createElement(Agreement, {ref: "agreement"}) : ''
	                        
	                    )
	                ), 
	                React.createElement("span", {className: "angle angle-right-bottom"})
	            )
	        )
	    }
	});
	module.exports = InvestDetail;

/***/ }

/******/ });